Integrand size = 18, antiderivative size = 582 \[ \int \frac {c+d x}{(a+b \sec (e+f x))^2} \, dx=\frac {(c+d x)^2}{2 a^2 d}-\frac {i b^3 (c+d x) \log \left (1+\frac {a e^{i (e+f x)}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} f}+\frac {2 i b (c+d x) \log \left (1+\frac {a e^{i (e+f x)}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} f}+\frac {i b^3 (c+d x) \log \left (1+\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} f}-\frac {2 i b (c+d x) \log \left (1+\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} f}+\frac {b^2 d \log (b+a \cos (e+f x))}{a^2 \left (a^2-b^2\right ) f^2}-\frac {b^3 d \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} f^2}+\frac {2 b d \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} f^2}+\frac {b^3 d \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \left (-a^2+b^2\right )^{3/2} f^2}-\frac {2 b d \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} f^2}+\frac {b^2 (c+d x) \sin (e+f x)}{a \left (a^2-b^2\right ) f (b+a \cos (e+f x))} \]
1/2*(d*x+c)^2/a^2/d+b^2*d*ln(b+a*cos(f*x+e))/a^2/(a^2-b^2)/f^2-I*b^3*(d*x+ c)*ln(1+a*exp(I*(f*x+e))/(b-(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(3/2)/f+I*b^ 3*(d*x+c)*ln(1+a*exp(I*(f*x+e))/(b+(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(3/2) /f-b^3*d*polylog(2,-a*exp(I*(f*x+e))/(b-(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^ (3/2)/f^2+b^3*d*polylog(2,-a*exp(I*(f*x+e))/(b+(-a^2+b^2)^(1/2)))/a^2/(-a^ 2+b^2)^(3/2)/f^2+b^2*(d*x+c)*sin(f*x+e)/a/(a^2-b^2)/f/(b+a*cos(f*x+e))+2*I *b*(d*x+c)*ln(1+a*exp(I*(f*x+e))/(b-(-a^2+b^2)^(1/2)))/a^2/f/(-a^2+b^2)^(1 /2)-2*I*b*(d*x+c)*ln(1+a*exp(I*(f*x+e))/(b+(-a^2+b^2)^(1/2)))/a^2/f/(-a^2+ b^2)^(1/2)+2*b*d*polylog(2,-a*exp(I*(f*x+e))/(b-(-a^2+b^2)^(1/2)))/a^2/f^2 /(-a^2+b^2)^(1/2)-2*b*d*polylog(2,-a*exp(I*(f*x+e))/(b+(-a^2+b^2)^(1/2)))/ a^2/f^2/(-a^2+b^2)^(1/2)
Time = 11.64 (sec) , antiderivative size = 1037, normalized size of antiderivative = 1.78 \[ \int \frac {c+d x}{(a+b \sec (e+f x))^2} \, dx=\frac {(e+f x) (-2 d e+2 c f+d (e+f x)) (b+a \cos (e+f x))^2 \sec ^2(e+f x)}{2 a^2 f^2 (a+b \sec (e+f x))^2}+\frac {(b+a \cos (e+f x)) \sec ^2(e+f x) \left (b^2 d e \sin (e+f x)-b^2 c f \sin (e+f x)-b^2 d (e+f x) \sin (e+f x)\right )}{a (-a+b) (a+b) f^2 (a+b \sec (e+f x))^2}+\frac {b \cos ^2\left (\frac {1}{2} (e+f x)\right ) (b+a \cos (e+f x)) \left (-\frac {2 \left (2 a^2-b^2\right ) (d e-c f) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {-a-b}}\right )}{\sqrt {-a-b} \sqrt {a-b}}-b d \log \left (\sec ^2\left (\frac {1}{2} (e+f x)\right )\right )+b d \log \left (-\left ((b+a \cos (e+f x)) \sec ^2\left (\frac {1}{2} (e+f x)\right )\right )\right )-\frac {i \left (2 a^2-b^2\right ) d \left (\log \left (1+i \tan \left (\frac {1}{2} (e+f x)\right )\right ) \log \left (\frac {i \left (\sqrt {a+b}-\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )\right )}{\sqrt {a-b}+i \sqrt {a+b}}\right )-\log \left (1-i \tan \left (\frac {1}{2} (e+f x)\right )\right ) \log \left (\frac {\sqrt {a+b}-\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{i \sqrt {a-b}+\sqrt {a+b}}\right )+\log \left (1-i \tan \left (\frac {1}{2} (e+f x)\right )\right ) \log \left (\frac {i \left (\sqrt {a+b}+\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )\right )}{\sqrt {a-b}+i \sqrt {a+b}}\right )-\log \left (1+i \tan \left (\frac {1}{2} (e+f x)\right )\right ) \log \left (\frac {\sqrt {a+b}+\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{i \sqrt {a-b}+\sqrt {a+b}}\right )-\operatorname {PolyLog}\left (2,\frac {\sqrt {a-b} \left (1-i \tan \left (\frac {1}{2} (e+f x)\right )\right )}{\sqrt {a-b}-i \sqrt {a+b}}\right )+\operatorname {PolyLog}\left (2,\frac {\sqrt {a-b} \left (1-i \tan \left (\frac {1}{2} (e+f x)\right )\right )}{\sqrt {a-b}+i \sqrt {a+b}}\right )-\operatorname {PolyLog}\left (2,\frac {\sqrt {a-b} \left (1+i \tan \left (\frac {1}{2} (e+f x)\right )\right )}{\sqrt {a-b}-i \sqrt {a+b}}\right )+\operatorname {PolyLog}\left (2,\frac {\sqrt {a-b} \left (1+i \tan \left (\frac {1}{2} (e+f x)\right )\right )}{\sqrt {a-b}+i \sqrt {a+b}}\right )\right )}{\sqrt {a-b} \sqrt {a+b}}\right ) \sec ^2(e+f x) \left (\left (2 a^2-b^2\right ) (c f+d f x)+a b d \sin (e+f x)\right ) \left (\sqrt {a+b}-\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )\right ) \left (\sqrt {a+b}+\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )\right )}{a^2 \left (a^2-b^2\right ) f^2 (a+b \sec (e+f x))^2 \left (-\left (\left (2 a^2-b^2\right ) \left (d e-c f-i d \log \left (1-i \tan \left (\frac {1}{2} (e+f x)\right )\right )+i d \log \left (1+i \tan \left (\frac {1}{2} (e+f x)\right )\right )\right )\right )+a b d \sin (e+f x)\right )} \]
((e + f*x)*(-2*d*e + 2*c*f + d*(e + f*x))*(b + a*Cos[e + f*x])^2*Sec[e + f *x]^2)/(2*a^2*f^2*(a + b*Sec[e + f*x])^2) + ((b + a*Cos[e + f*x])*Sec[e + f*x]^2*(b^2*d*e*Sin[e + f*x] - b^2*c*f*Sin[e + f*x] - b^2*d*(e + f*x)*Sin[ e + f*x]))/(a*(-a + b)*(a + b)*f^2*(a + b*Sec[e + f*x])^2) + (b*Cos[(e + f *x)/2]^2*(b + a*Cos[e + f*x])*((-2*(2*a^2 - b^2)*(d*e - c*f)*ArcTan[(Sqrt[ a - b]*Tan[(e + f*x)/2])/Sqrt[-a - b]])/(Sqrt[-a - b]*Sqrt[a - b]) - b*d*L og[Sec[(e + f*x)/2]^2] + b*d*Log[-((b + a*Cos[e + f*x])*Sec[(e + f*x)/2]^2 )] - (I*(2*a^2 - b^2)*d*(Log[1 + I*Tan[(e + f*x)/2]]*Log[(I*(Sqrt[a + b] - Sqrt[a - b]*Tan[(e + f*x)/2]))/(Sqrt[a - b] + I*Sqrt[a + b])] - Log[1 - I *Tan[(e + f*x)/2]]*Log[(Sqrt[a + b] - Sqrt[a - b]*Tan[(e + f*x)/2])/(I*Sqr t[a - b] + Sqrt[a + b])] + Log[1 - I*Tan[(e + f*x)/2]]*Log[(I*(Sqrt[a + b] + Sqrt[a - b]*Tan[(e + f*x)/2]))/(Sqrt[a - b] + I*Sqrt[a + b])] - Log[1 + I*Tan[(e + f*x)/2]]*Log[(Sqrt[a + b] + Sqrt[a - b]*Tan[(e + f*x)/2])/(I*S qrt[a - b] + Sqrt[a + b])] - PolyLog[2, (Sqrt[a - b]*(1 - I*Tan[(e + f*x)/ 2]))/(Sqrt[a - b] - I*Sqrt[a + b])] + PolyLog[2, (Sqrt[a - b]*(1 - I*Tan[( e + f*x)/2]))/(Sqrt[a - b] + I*Sqrt[a + b])] - PolyLog[2, (Sqrt[a - b]*(1 + I*Tan[(e + f*x)/2]))/(Sqrt[a - b] - I*Sqrt[a + b])] + PolyLog[2, (Sqrt[a - b]*(1 + I*Tan[(e + f*x)/2]))/(Sqrt[a - b] + I*Sqrt[a + b])]))/(Sqrt[a - b]*Sqrt[a + b]))*Sec[e + f*x]^2*((2*a^2 - b^2)*(c*f + d*f*x) + a*b*d*Sin[ e + f*x])*(Sqrt[a + b] - Sqrt[a - b]*Tan[(e + f*x)/2])*(Sqrt[a + b] + S...
Time = 1.42 (sec) , antiderivative size = 582, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 4679, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {c+d x}{(a+b \sec (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {c+d x}{\left (a+b \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 4679 |
\(\displaystyle \int \left (\frac {b^2 (c+d x)}{a^2 (a \cos (e+f x)+b)^2}-\frac {2 b (c+d x)}{a^2 (a \cos (e+f x)+b)}+\frac {c+d x}{a^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 i b (c+d x) \log \left (1+\frac {a e^{i (e+f x)}}{b-\sqrt {b^2-a^2}}\right )}{a^2 f \sqrt {b^2-a^2}}-\frac {2 i b (c+d x) \log \left (1+\frac {a e^{i (e+f x)}}{\sqrt {b^2-a^2}+b}\right )}{a^2 f \sqrt {b^2-a^2}}+\frac {b^2 (c+d x) \sin (e+f x)}{a f \left (a^2-b^2\right ) (a \cos (e+f x)+b)}+\frac {2 b d \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b-\sqrt {b^2-a^2}}\right )}{a^2 f^2 \sqrt {b^2-a^2}}-\frac {2 b d \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b+\sqrt {b^2-a^2}}\right )}{a^2 f^2 \sqrt {b^2-a^2}}+\frac {b^2 d \log (a \cos (e+f x)+b)}{a^2 f^2 \left (a^2-b^2\right )}-\frac {i b^3 (c+d x) \log \left (1+\frac {a e^{i (e+f x)}}{b-\sqrt {b^2-a^2}}\right )}{a^2 f \left (b^2-a^2\right )^{3/2}}+\frac {i b^3 (c+d x) \log \left (1+\frac {a e^{i (e+f x)}}{\sqrt {b^2-a^2}+b}\right )}{a^2 f \left (b^2-a^2\right )^{3/2}}-\frac {b^3 d \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b-\sqrt {b^2-a^2}}\right )}{a^2 f^2 \left (b^2-a^2\right )^{3/2}}+\frac {b^3 d \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b+\sqrt {b^2-a^2}}\right )}{a^2 f^2 \left (b^2-a^2\right )^{3/2}}+\frac {(c+d x)^2}{2 a^2 d}\) |
(c + d*x)^2/(2*a^2*d) - (I*b^3*(c + d*x)*Log[1 + (a*E^(I*(e + f*x)))/(b - Sqrt[-a^2 + b^2])])/(a^2*(-a^2 + b^2)^(3/2)*f) + ((2*I)*b*(c + d*x)*Log[1 + (a*E^(I*(e + f*x)))/(b - Sqrt[-a^2 + b^2])])/(a^2*Sqrt[-a^2 + b^2]*f) + (I*b^3*(c + d*x)*Log[1 + (a*E^(I*(e + f*x)))/(b + Sqrt[-a^2 + b^2])])/(a^2 *(-a^2 + b^2)^(3/2)*f) - ((2*I)*b*(c + d*x)*Log[1 + (a*E^(I*(e + f*x)))/(b + Sqrt[-a^2 + b^2])])/(a^2*Sqrt[-a^2 + b^2]*f) + (b^2*d*Log[b + a*Cos[e + f*x]])/(a^2*(a^2 - b^2)*f^2) - (b^3*d*PolyLog[2, -((a*E^(I*(e + f*x)))/(b - Sqrt[-a^2 + b^2]))])/(a^2*(-a^2 + b^2)^(3/2)*f^2) + (2*b*d*PolyLog[2, - ((a*E^(I*(e + f*x)))/(b - Sqrt[-a^2 + b^2]))])/(a^2*Sqrt[-a^2 + b^2]*f^2) + (b^3*d*PolyLog[2, -((a*E^(I*(e + f*x)))/(b + Sqrt[-a^2 + b^2]))])/(a^2*( -a^2 + b^2)^(3/2)*f^2) - (2*b*d*PolyLog[2, -((a*E^(I*(e + f*x)))/(b + Sqrt [-a^2 + b^2]))])/(a^2*Sqrt[-a^2 + b^2]*f^2) + (b^2*(c + d*x)*Sin[e + f*x]) /(a*(a^2 - b^2)*f*(b + a*Cos[e + f*x]))
3.1.41.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, 1/(Sin[e + f*x]^n/(b + a*Si n[e + f*x])^n), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && ILtQ[n, 0] && IGt Q[m, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1288 vs. \(2 (528 ) = 1056\).
Time = 0.64 (sec) , antiderivative size = 1289, normalized size of antiderivative = 2.21
1/2/a^2*d*x^2+1/a^2*x*c+2*I/f/(a^2-b^2)*b*d/(-a^2+b^2)^(1/2)*ln((-a*exp(I* (f*x+e))+(-a^2+b^2)^(1/2)-b)/(-b+(-a^2+b^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ln((-a*exp(I*(f*x+e))+(-a^2+b^2)^(1/2)-b)/(-b+(-a^2+b^2)^(1/2)))*e+4*I/f/( a^2-b^2)^(3/2)*b*c*arctan(1/2*(2*a*exp(I*(f*x+e))+2*b)/(a^2-b^2)^(1/2))-2/ f^2/(a^2-b^2)/a^2*b^2*d*ln(exp(I*(f*x+e)))+1/f^2/(a^2-b^2)/a^2*b^2*d*ln(ex p(2*I*(f*x+e))*a+2*exp(I*(f*x+e))*b+a)+I/f/(a^2-b^2)/a^2*b^3*d/(-a^2+b^...
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2080 vs. \(2 (520) = 1040\).
Time = 0.49 (sec) , antiderivative size = 2080, normalized size of antiderivative = 3.57 \[ \int \frac {c+d x}{(a+b \sec (e+f x))^2} \, dx=\text {Too large to display} \]
1/2*((a^4*b - 2*a^2*b^3 + b^5)*d*f^2*x^2 + 2*(a^4*b - 2*a^2*b^3 + b^5)*c*f ^2*x - ((2*a^4*b - a^2*b^3)*d*cos(f*x + e) + (2*a^3*b^2 - a*b^4)*d)*sqrt(- (a^2 - b^2)/a^2)*dilog(-(b*cos(f*x + e) + I*b*sin(f*x + e) + (a*cos(f*x + e) + I*a*sin(f*x + e))*sqrt(-(a^2 - b^2)/a^2) + a)/a + 1) + ((2*a^4*b - a^ 2*b^3)*d*cos(f*x + e) + (2*a^3*b^2 - a*b^4)*d)*sqrt(-(a^2 - b^2)/a^2)*dilo g(-(b*cos(f*x + e) + I*b*sin(f*x + e) - (a*cos(f*x + e) + I*a*sin(f*x + e) )*sqrt(-(a^2 - b^2)/a^2) + a)/a + 1) - ((2*a^4*b - a^2*b^3)*d*cos(f*x + e) + (2*a^3*b^2 - a*b^4)*d)*sqrt(-(a^2 - b^2)/a^2)*dilog(-(b*cos(f*x + e) - I*b*sin(f*x + e) + (a*cos(f*x + e) - I*a*sin(f*x + e))*sqrt(-(a^2 - b^2)/a ^2) + a)/a + 1) + ((2*a^4*b - a^2*b^3)*d*cos(f*x + e) + (2*a^3*b^2 - a*b^4 )*d)*sqrt(-(a^2 - b^2)/a^2)*dilog(-(b*cos(f*x + e) - I*b*sin(f*x + e) - (a *cos(f*x + e) - I*a*sin(f*x + e))*sqrt(-(a^2 - b^2)/a^2) + a)/a + 1) + (-I *(2*a^3*b^2 - a*b^4)*d*f*x - I*(2*a^3*b^2 - a*b^4)*d*e + (-I*(2*a^4*b - a^ 2*b^3)*d*f*x - I*(2*a^4*b - a^2*b^3)*d*e)*cos(f*x + e))*sqrt(-(a^2 - b^2)/ a^2)*log((b*cos(f*x + e) + I*b*sin(f*x + e) + (a*cos(f*x + e) + I*a*sin(f* x + e))*sqrt(-(a^2 - b^2)/a^2) + a)/a) + (I*(2*a^3*b^2 - a*b^4)*d*f*x + I* (2*a^3*b^2 - a*b^4)*d*e + (I*(2*a^4*b - a^2*b^3)*d*f*x + I*(2*a^4*b - a^2* b^3)*d*e)*cos(f*x + e))*sqrt(-(a^2 - b^2)/a^2)*log((b*cos(f*x + e) + I*b*s in(f*x + e) - (a*cos(f*x + e) + I*a*sin(f*x + e))*sqrt(-(a^2 - b^2)/a^2) + a)/a) + (I*(2*a^3*b^2 - a*b^4)*d*f*x + I*(2*a^3*b^2 - a*b^4)*d*e + (I*...
\[ \int \frac {c+d x}{(a+b \sec (e+f x))^2} \, dx=\int \frac {c + d x}{\left (a + b \sec {\left (e + f x \right )}\right )^{2}}\, dx \]
Exception generated. \[ \int \frac {c+d x}{(a+b \sec (e+f x))^2} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
\[ \int \frac {c+d x}{(a+b \sec (e+f x))^2} \, dx=\int { \frac {d x + c}{{\left (b \sec \left (f x + e\right ) + a\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {c+d x}{(a+b \sec (e+f x))^2} \, dx=\text {Hanged} \]